package com.mrx.wallabagserver.controller;

import com.mrx.wallabagserver.service.WallBagService;
import jakarta.annotation.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mr.X
 * @since 2024-03-15 09:08
 **/
@RestController
@RequestMapping("/api")
public class WallBagController {

    @Resource
    private WallBagService wallBagService;

    @GetMapping("/info")
    public Object info() {
        return wallBagService.info();
    }

    @GetMapping("/version")
    public ResponseEntity<?> version() {
        return ResponseEntity.ok("\"" + wallBagService.version() + "\"");
    }

}
